/*
 * Copyright (C) 2012  Forklabs Daniel Léonard
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package ca.forklabs.wow.net;

/**
 * Enum {@code Region} represents each and every region in
 * <em>World of Warcraft</em>.
 */
public enum Region {

   /** The American region, including Oceanic, Latin America and Brazil. */
   Americas {
      @Override
      public String hostname() {
         return "us.battle.net"; //$NON-NLS-1$
         }
      },

   /** The Europe region. */
   Europe {
      @Override
      public String hostname() {
         return "eu.battle.net"; //$NON-NLS-1$
         }
      },

   /** The Korea region. */
   Korea {
      @Override
      public String hostname() {
         return "kr.battle.net"; //$NON-NLS-1$
         }
      },

   /** The Taiwan region. */
   Taiwan {
      @Override
      public String hostname() {
         return "tw.battle.net"; //$NON-NLS-1$
         }
      },

   /** The China region. */
   China {
      @Override
      public String hostname() {
      // "cn.battle.net" seems to provide more
      // information than "battlenet.com.cn"
         //return "cn.battle.net"; //$NON-NLS-1$
         return "www.battlenet.com.cn"; //$NON-NLS-1$
         }
      };

   /**
    * Gets the <em>Battle.net</em> hostname.
    * @return   the hostname.
    * @see   "http://blizzard.github.com/api-wow-docs/#id3379605"
    */
   public abstract String hostname();

   }